package com.dd.ent.car.ui.adapter.general;

import android.content.Context;
import android.view.View;

import com.dd.ent.car.common.bean.video.Video;
import com.dd.ent.car.ui.adapter.ViewHolder;
import com.dd.ent.car.ui.adapter.base.BaseListAdapter;
import com.dd.ent.car.ui.home.templet.video.VideoFeedVideoView;


/**
 * Created by huanghaibin
 * on 16-5-23.
 */
public class VideoAdapter extends BaseListAdapter<Video> {
    private String systemTime;
    public VideoAdapter(Callback callback) {
        super(callback);
    }

    @Override
    protected void convert(ViewHolder vh, Video item, int position) {

    }

    @Override
    protected void refreshData(ViewHolder vh, View view, Video item, int position) {
        if (view instanceof VideoFeedVideoView){
            VideoFeedVideoView videoFeedVideoView= (VideoFeedVideoView) view;
            videoFeedVideoView.refreshData(position,item);
        }
    }

    @Override
    protected int getLayoutId(int position, Video item) {
        return -1;
    }

    @Override
    protected View bindView(Context context, int position, Video item) {
        return new VideoFeedVideoView(context);
    }


    public void setSystemTime(String systemTime) {
        this.systemTime = systemTime;
    }
}
